package com.sg.dto.integration.app;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc TargetDashboardCompletionStatusDto
 * @使用场景
 */
@Data
public class TargetDashboardCompletionStatusDto
        extends BaseDto
        implements Serializable {

    /**
     * 检查仪表盘更新记录ID
     */
    @ApiModelProperty("检查仪表盘更新记录ID ")
    private String checkItemPanelUpdateId;

    /**
     * 检验项标识
     */
    @ApiModelProperty("检验项标识")
    private String checkItemCode;

    /**
     * 目标数值
     */
    @ApiModelProperty("目标数值")
    private Long targetValue;

    /**
     * 实际数值
     */
    @ApiModelProperty("实际数值")
    private Long actualValue;

    /**
     * 是否已完成 TRUE:是 FALSE:否
     */
    @ApiModelProperty("是否已完成")
    private String isComplete;

    /**
     * 检查项ID
     */
    @ApiModelProperty("检查项ID")
    private String checkItemId;

    /**
     * 检查项名称
     */
    @ApiModelProperty("检查项名称 ")
    private String checkItemName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        TargetDashboardCompletionStatusDto that = (TargetDashboardCompletionStatusDto) o;
        return (
                checkItemPanelUpdateId == that.checkItemPanelUpdateId &&
                        checkItemCode == that.checkItemCode &&
                        targetValue == that.targetValue &&
                        actualValue == that.actualValue &&
                        isComplete == that.isComplete &&
                        checkItemId == that.checkItemId &&
                        checkItemName == that.checkItemName
        );
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                super.hashCode(),
                checkItemPanelUpdateId,
                checkItemCode,
                targetValue,
                actualValue,
                isComplete,
                checkItemId,
                checkItemName
        );
    }

}
